import type { PatientItem, PatientParams } from '@/types/patient'
import { request } from '@/untils/http'
// 添加患者
export const addPatientApi = (data: PatientParams) => {
  return request.post('/patient/add', data)
}
// 获取患者列表
export const patientListApi = ()=>{
  return request.get<null,PatientItem[]>('/patient/mylist')
}
// 删除患者信息

export const removePatientApi = (id:string)=>{
  return request.delete(`/patient/del/${id}`)
}

// 查询患者信息
// 
export const patientDetailApi = (id:string)=>{
  return request.get<null,PatientItem>(`/patient/info/${id}`)
}

// 编辑患者信息
// /patient/update
export const updatePatientApi  = (data:PatientParams)=>{
  return request.put('/patient/update',data)
}

